<html>
<head >
	<meta name="layout" content="main" />
	<title>Weceem </title>
	<script type="text/javascript" src="/${grails.util.Metadata.current.'app.name'}/js/jquery/jquery-ui-1.8.18.custom.js"></script>
		<script type="text/javascript" src="/${grails.util.Metadata.current.'app.name'}/js/sortable/jquery-sortable.js"></script>
		
		<script type="text/javascript" src="/${grails.util.Metadata.current.'app.name'}/js/treeTable/javascriptsa/jquery.treeTable.js"></script>
		<script type="text/javascript" src="/${grails.util.Metadata.current.'app.name'}/js/treeTable/javascriptsa/core.treeTable.js"></script>
		<script type="text/javascript" src="/${grails.util.Metadata.current.'app.name'}/js/treeTable/javascriptsa/jquery.treeTable.js"></script>

		
		<link rel="stylesheet" href="/${grails.util.Metadata.current.'app.name'}/js/treeTable/stylesheets/jquery.treeTable.css" type="text/css">
		<link rel="stylesheet" href="/${grails.util.Metadata.current.'app.name'}/css/contentRepository.css" type="text/css">


<style type="text/css">
	td span.ui-icon { display: inline;}
	th {text-align: left}
	span.ui-icon-circle-triangle-e { float: left; margin-left: -2.6em; }
	.nodeinfo { font-size: 85%;}
	.nodeinfoDialog { display:none;}
	span.ui-icon-info { float: left; margin-right: 0.8em; }
	span.ui-icon-circle-plus { float: left; margin-right: 0.5em; }
	span.ui-icon-circle-minus { float: left; }
	a:hover { text-decoration: underline;}
	ul.childList { font-size: 1em}
	.ui-state-highlight { height: 1.5em; line-height: 1.2em; }

    h2.title + span.type { margin-left: 10px;}
    
    #repository-toolbar label { display:inline; padding-right: 4px; }
    #repository-searchbox { text-align: right; }
</style>
<script type="text/javascript">

var resources = {};


function init(){
    var haveChildren = {};
    <g:each var="data" in="${haveChildren}">
      haveChildren["${data.key}"] = ${data.value};
    </g:each>
    resources["haveChildren"] = haveChildren;
    resources["content.button.create"] = "${message(code:'content.button.create', encodeAs:'JavaScript')}";
    resources["content.button.cancel"] = "${message(code:'content.button.cancel', encodeAs:'JavaScript')}";
    resources["link.movenode"] = "${createLink(action: 'moveNode', controller: 'wcmRepository')}";
    resources["link.copynode"] = "${createLink(action: 'copyNode', controller: 'wcmRepository')}";
    resources["link.deletenode"] = "${createLink(action: 'deleteNode', controller: 'wcmRepository')}";
    resources["link.treetable"] = "${createLink(action: 'treeTable', controller: 'wcmRepository')}";
    resources["link.preview"] = "${createLink(action: 'preview', controller: 'wcmRepository')}";
    resources["search.request"] = "${createLink(action: 'searchRequest', controller: 'wcmRepository')}";

    
    cacheParams["isAsc"] = true;
    cacheParams["sortField"] = "title";
}

$(function(){
    init();
    initTreeTable();
})
</script>
</head>
<body>

    <div class="span-24 last">
        <div class="container" id="repository-toolbar">
            



            <div id="treeDiv">
              <div class="table treeTable">
                  <div id="insert-marker"  class="ui-helper-hidden">
                      <img src="${g.resource(plugin:'weceem', dir:'_weceem/images/weceem', file:'inserter.gif')}"/>
                  </div>
                  
                <table id="treeTable">
                  <thead>
                    <tr>
                      <th align="left" class="page-column"><g:message code="header.content" default="Page"/></th>
                      <th align="left"><g:message code="header.status" default="Status"/></th>
                      <th align="left"><g:message code="header.createdBy" default="Created by"/></th>
                      <th align="left"><g:message code="header.lastChanged" default="Last changed"/></th>
                    </tr>
                  </thead>
                  <tbody>

                	<g:each in="${content}" var="c">
                	${c.title}
                		<g:render template="newtreeTableNode" model="[c:c]"/>
                	</g:each>
                  </tbody>
                </table>
             </div>
            </div>
            
            




</body>
</html>
